/**
 * @author Jason Pratt
 */

package edu.cmu.cs.stage3.alice.authoringtool.util;

import edu.cmu.cs.stage3.alice.authoringtool.JAlice;

public class SplashScreen extends java.awt.Frame {

 protected java.awt.Window splashWindow;

 public SplashScreen () {
  splashWindow = new ProgressFrame();
  }

 public void showSplash () {
  java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
  int x = (screenSize.width - 300)/2;
  int y = (screenSize.height - 200)/2;
  splashWindow.setLocation( x, y );
  this.setLocation( x, y  );
  if (!JAlice.isApplet()) {
   splashWindow.setVisible( true );
   }
  }

 public void hideSplash() {
  splashWindow.setVisible( false );
  }

 }
